// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 创建笔记 POST /api/notes/add */
export async function addNoteUsingPost(
  body: API.NotesAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/notes/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 清除所有笔记列表缓存 GET /api/notes/clearAllNotesCache */
export async function clearAllNotesCacheUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/api/notes/clearAllNotesCache', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 删除笔记 POST /api/notes/delete */
export async function deleteNoteUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notes/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 编辑笔记 POST /api/notes/edit */
export async function editNoteUsingPost(
  body: API.NotesEditRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notes/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 编辑笔记可见性 POST /api/notes/edit/visibility */
export async function editNoteVisibilityUsingPost(
  body: API.NotesEditVisibilityRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notes/edit/visibility', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据 id 获取笔记审核状态 GET /api/notes/get/review_status */
export async function getNoteReviewStatusByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNoteReviewStatusByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseInt_>('/api/notes/get/review_status', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 根据 id 获取笔记可见性 GET /api/notes/get/visibility */
export async function getNoteVisibilityByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNoteVisibilityByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseInt_>('/api/notes/get/visibility', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 根据 id 获取笔记（封装类） GET /api/notes/get/vo */
export async function getNoteVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNoteVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseNotesVO_>('/api/notes/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 管理端-分页获取笔记列表 POST /api/notes/list/admin/page */
export async function listNotesByPageUsingPost(
  body: API.NotesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageAdminNotesVO_>('/api/notes/list/admin/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 管理端-分页获取待审核笔记列表 POST /api/notes/list/admin/page/reviewing */
export async function listPublicReviewingNotesByPageUsingPost(
  body: API.NotesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageAdminNotesVO_>('/api/notes/list/admin/page/reviewing', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 分页获取笔记列表（封装类） POST /api/notes/list/page/vo */
export async function listNotesVoByPageUsingPost(
  body: API.NotesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageNotesVO_>('/api/notes/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 获取首页系统预设分类和标签 GET /api/notes/list/tags_category */
export async function listNoteTagsCategoryUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseNoteTagsCategory_>('/api/notes/list/tags_category', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 分页获取当前登录用户创建的笔记列表 POST /api/notes/my/list/page/vo */
export async function listMyNotesVoByPageUsingPost(
  body: API.NotesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageMyNoteVO_>('/api/notes/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 审核笔记 POST /api/notes/update */
export async function updateNoteUsingPost(
  body: API.NotesUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/notes/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
